import rational.Rational;

import java.util.Scanner;

public class Example {
    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        Rational r1 = new Rational();
        r1.setDenominator(scanner.nextInt());
        r1.setNumerator(scanner.nextInt());
        Rational r2 = new Rational();
        r2.setDenominator(scanner.nextInt());
        r2.setNumerator(scanner.nextInt());
        Rational result = r1.add(r2);
        int a = result.getNumerator();
        int b = result.getDenominator();
        System.out.printf("%d/%d+%d/%d=%d/%d",
                r1.getNumerator(),
                r1.getDenominator(),
                r2.getNumerator(),
                r2.getDenominator(), a, b);
    }
}
